Skip to content

Say how to screen an outside pull request without running it - #373

Merged
SDL-A1 merged 1 commit into
mainfrom
docs/pr-screening-checklist
Nov 18, 2026
Merged

SDL-A1 merged 1 commit into
mainfrom
docs/pr-screening-checklist

Conversation

@SDL-A1

@SDL-A1 SDL-A1 commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Turns the existing "screen foreign code before reading it for correctness" rule into something actionable, by saying how.

The point the previous wording missed: cargo build and cargo test execute a contributor's code as the developer — SSH keys, gh token, write access to /var/lib/rustock — before a line has been read. Merging was never the dangerous step.

Adds three questions answerable from the diff alone:

  1. new [[package]] entries in Cargo.lock
  2. build-time surfaces — build.rs, .cargo/config.toml, rust-toolchain.toml, proc macros
  3. non-Rust executables — shell scripts, Dockerfiles, Makefiles, CI workflows

All three clean means reading the diff is the whole review. Any one dirty means the build belongs in a throwaway container, regardless of who the author appears to be.

.cargo/config.toml gets its own mention because it is the quietest: a runner, linker or [alias] there is arbitrary command execution that reads as configuration rather than code. This repository has none, so one appearing in a PR is a flag by itself.

Written while reviewing #365 and #366, then applied to them: #365 clean on all three, #366 dirty on the third — which is why its four Docker and shell files were read line by line.

The .gitignore change is unrelated housekeeping, root-anchored, and preserves the /dist/ and /bin/ entries #366 added.

🤖 Generated with Claude Code

The repository already said to screen foreign code before reading it for correctness. It did not say how, and the how is the part that matters: cargo build and cargo test execute a contributor's code as the developer, with their SSH keys, their gh token and write access to /var/lib/rustock, before a line has been read. The node in production runs hardened under systemd; the development machine does not. Merging was never the dangerous step.

Adds three questions answerable from the diff alone -- new [[package]] entries in Cargo.lock, build-time surfaces (build.rs, .cargo/config.toml, rust-toolchain.toml, proc macros), and non-Rust executables. All three clean means reading the diff is the whole review. Any one dirty means the build belongs in a throwaway container, whoever the author appears to be.

Singles out .cargo/config.toml because it is the quietest: a runner, linker or alias there is arbitrary command execution that reads as configuration rather than code. This repository has none, so one appearing in a pull request is a flag by itself. Also notes that rust-analyzer runs build.rs and expands proc macros when a project is opened, so an editor is an execution vector too.

Written while reviewing #365 and #366, which the checklist was then applied to: #365 came out clean on all three, #366 dirty on the third, and the four Docker and shell files were read line by line as a result.

The .gitignore entries are unrelated housekeeping: the SPV wallet lives outside this tree, and these are a second line of defence. Root-anchored so a crate directory named client or server is unaffected, and the /dist/ and /bin/ entries from #366 are preserved.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SDL-A1
SDL-A1 merged commit 640dfb9 into main Nov 18, 2026
7 checks passed
ColbySerpa added a commit to HORNET-Storage/Rustock that referenced this pull request Nov 18, 2026
Upstream's four pull requests since 169ef57: the external IP looked up
over HTTPS when --external-ip is not set (Rustock-dev#365), the node run from a
prebuilt binary in Docker and configured from .env (Rustock-dev#366), libz-sys
moved past its heap-overflow advisory (Rustock-dev#367), and CLAUDE.md on
screening an outside pull request without running it (Rustock-dev#373).

Three files conflicted:

- crates/cli/Cargo.toml: both sides added tokio-rustls (ring, tls12)
  and webpki-roots, upstream's for the external-IP lookup and this
  branch's for --import. They are listed once, under one comment for
  both, beside this branch's serde_json and sha2. Cargo.lock gains no
  package over upstream's.
- deny.toml: both sides rewrote the note on webpki-roots' licence. It
  now names every use: the external-IP lookup, Rootstock's server for
  --import, a stable minimum gas price's web source, and lettre under
  the smtp feature.
- crates/cli/src/main.rs: both sides' modules are kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants